﻿#切片
# L = ["a","b","c","d"];
# print(L[0:2]);#输出的是a，b
# print(L[:2]);
# T = ("a","b","c","d");
# print(T[0:2]);
# nums = [1,2,3,5,6,7,8,9]
# print(nums[::2])

# 迭代
# D = {"a":1,"b":2,"c":3};
# for k in D:
	# print(k);
	# print(D[k]);
# for k,v in D.items():
	# print(k,":",v);
# # 生成1-11的基数数列
# print(list(range(1,11,2)));

# generator发电机 
def odd():
	print("1");
	yield 1;
	print("2");
	yield 2;
o = odd();
next(o);
next(o);